<%@ taglib uri="/WEB-INF/myfaces_html.tld" 	prefix="h" %>
<%@ taglib uri="/WEB-INF/myfaces_core.tld" 	prefix="f" %>
<%@ taglib uri="/WEB-INF/tomahawk.tld"     	prefix="t" %>
<%@ page import="java.util.ArrayList" %>

<f:view>
    <jsp:include page="/intestazione.jsp">
        <jsp:param name="titolo" value="Gestione Configurazione"/>
    </jsp:include>
    <jsp:include page="/menu.jsp"/>
    <script language="javascript" src="./script/popup_full_center.js"></script>
    <script language="javascript" src="./script/confirmCM.js"></script>
    
    <br />
    <table class="find" style="border: 2pt solid white; margin-bottom: -10px">
        <hr />
        <tr>  
            <td class="intestazionePagina" align="center">
            <strong>Configurazione</strong></td>                        
        </tr>        
    </table>
    
    <t:saveState value="#{beanConfigurazione}"/>
    <h:form binding="#{dettaglioConfigurazione.form}" id="formLookup">              
        <br/>
        <table class="dettaglio">
            <tbody>          
         
            <tr>                   
                <td class="etichettaDettaglio"><strong><t:outputLabel for="email" value="Email (*)"/></strong></td>
                <td><t:inputText id="email" value="#{beanConfigurazione.nomeutente}" styleClass="dettaglio_InputText"  size="75" maxlength="50" required="true"/>
                <h:message style="color: red" for="email" showDetail="true" showSummary="false" /></td>
            </tr>   
            
             <tr>                   
                <td class="etichettaDettaglio"><strong><t:outputLabel for="password" value="Password (*)"/></strong></td>
                <td><t:inputSecret id="password" value="#{beanConfigurazione.password}" styleClass="dettaglio_InputText"  size="75" maxlength="50" required="true"/>
                <h:message style="color: red" for="password" showDetail="true" showSummary="false" /></td>
            </tr>   
            
             <tr>                   
                <td class="etichettaDettaglio"><strong><t:outputLabel for="smtp" value="Smtp (*)"/></strong></td>
                <td><t:inputText id="smtp" value="#{beanConfigurazione.smtp}" styleClass="dettaglio_InputText"  size="75" maxlength="50" required="true"/>
                <h:message style="color: red" for="smtp" showDetail="true" showSummary="false" /></td>
            </tr>   
            
             <tr>                   
                <td class="etichettaDettaglio"><strong><t:outputLabel for="porta" value="Porta (*)"/></strong></td>
                <td><t:inputText id="porta" value="#{beanConfigurazione.porta}" styleClass="dettaglio_InputText"  size="75" maxlength="50" required="true"/>
                <h:message style="color: red" for="porta" showDetail="true" showSummary="false" /></td>
            </tr>   
        
        </table>
        <br/>
     
        <t:inputHidden value="#{beanConfigurazione.id}"/>
        <table bgcolor="#FFFFFF" width="750px">
            <tr>     
                <td>
                    <h:commandLink styleClass="commandLink_Style" dir="RTL" action="benvenuto" immediate="true">
                        <t:graphicImage url="/image/go-home.png" border="0"/>
                    </h:commandLink>              
                </td>   
                <td>
                    <t:commandLink action="#{dettaglioConfigurazione.primo}"  rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/primo.png" border="0" title="Vai al primo elemento"/>
                        <f:param name="bean" value="beanConfigurazione"/>                        
                        <f:param name="id" value="#{beanConfigurazione.id}"/>                 
                    </t:commandLink>
                </td>
                <td>
                    <t:commandLink action="#{dettaglioConfigurazione.precedente}" rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/indietro.png" border="0" title="Indietro"/>
                        <f:param name="bean" value="beanConfigurazione"/>                        
                        <f:param name="id" value="#{beanConfigurazione.id}"/>                 
                    </t:commandLink>
                </td>
                <td>
                    <t:commandLink action="#{dettaglioConfigurazione.successivo}" rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/avanti.png" border="0" title="Avanti"/>
                        <f:param name="bean" value="beanConfigurazione"/>                        
                        <f:param name="id" value="#{beanConfigurazione.id}"/>                 
                    </t:commandLink>
                </td>
                <td>
                    <t:commandLink action="#{dettaglioConfigurazione.ultimo}" rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/ultimo.png" border="0" title="Vai all'ultimo elemento"/>
                        <f:param name="bean" value="beanConfigurazione"/>                        
                        <f:param name="id" value="#{beanConfigurazione.id}"/>                 
                    </t:commandLink>
                </td>
              
                <td>
                    <h:commandLink dir="RTL" onmousedown="return confirmDelete(this);" title="cancella" action="#{dettaglioConfigurazione.cancella}" rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/stop.png" border="0" title="Cancella"/>
                        <f:param name="bean" value="beanConfigurazione" />
                    </h:commandLink>                
                </td>      
                         
                <td>
                    <h:commandLink dir="RTL" onmousedown="return confirmUpdate(this);" title="modifica" action="#{dettaglioConfigurazione.modifica}" rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/salva.png" border="0" title="Salva modifiche"/>
                        <f:param name="bean" value="beanConfigurazione" />
                    </h:commandLink>                
                </td>    

                <td>
                    <h:commandLink dir="RTL" onmousedown="return confirmSave(this);" title="salva inserimento" action="#{dettaglioConfigurazione.inserisci}" rendered="#{beanConfigurazione.id eq null}">
                        <t:graphicImage url="image/salva.png" border="0" title="Salva inserimento"/>
                        <f:param name="bean" value="beanConfigurazione" />
                    </h:commandLink>                
                </td>
                <%--
                <td>
                <h:commandLink dir="RTL" title="Annulla operazione" action="#{dettaglioConfigurazione.annulla}" rendered="#{beanConfigurazione.id eq null}" immediate="true">
                <t:graphicImage url="image/delete.png" border="0"/>
                <f:param name="bean" value="beanConfigurazione" />
                </h:commandLink>                     
                </td>
                --%>
                <td>
                    <h:commandLink dir="RTL" title="inserisce nuovo elemento" action="#{dettaglioConfigurazione.inserisciDettaglio}" rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/nuovo.png" border="0" title="Inserisci NUOVO"/>
                        <f:param name="bean" value="beanConfigurazione" />
                    </h:commandLink>
                </td>
                
                <td>
                    <h:commandLink  title="LISTA" id="lista" action="#{dettaglioConfigurazione.lista}" rendered="#{beanConfigurazione.id ne null}">
                        <t:graphicImage url="image/lista.png" border="0" title="Carica lista" style="width:32px; height:32px"/>
                        <f:param name="bean" value="Configurazione" />
                    </h:commandLink>
                </td>
              
                <td>                
                    <t:commandLink id="aiuto" onclick="loadurl('info/legendaBottoniDettaglio.jsf');" immediate="true">
                        <t:graphicImage url="image/help.png" border="0" title="Aiuto"/>
                    </t:commandLink>
                </td> 
            </tr>
        </table>
    </h:form> 
    
    <h:form id="erroriDataBase" rendered="false">
        <f:verbatim><table><td align="left" class="messaggiErrore" height="2px"></f:verbatim>           
        <h:messages style="color: red" showDetail="true" showSummary="false"/>
        <f:verbatim></td></table></f:verbatim>
    </h:form>     
   
    <jsp:include page="/piePagina.jsp"/>      
</f:view>
